package com.mars.basic.convert;


import com.mars.basic.allmain.entity.RoleEntity;
import com.mars.basic.allmain.po.Role;
import com.mars.common.convert.IEntityPOConvert;
import com.mars.common.utils.Beans;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Component
@Lazy
public class RoleConvert implements IEntityPOConvert<RoleEntity,Role> {
    @Override
    public RoleEntity toEntity(Role u) {
        return Beans.mapper(u, RoleEntity.class); }

    @Override
    public Role toPo(RoleEntity e) {
        return Beans.mapper(e,Role.class);
    }
}
